package com.qfedu.utils;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @author:zhengyilong
 * @email:1797344574@qq.com
 * @phone:13479394730
 * @desc:
 * @DateTime:2022/5/12 16:04
 **/
@ControllerAdvice
public class MyExceptionHandler {

    @ExceptionHandler(NullPointerException.class)
    public String nullHandler(){
        return("/err1.jsp");
    }

    @ExceptionHandler(NumberFormatException.class)
    public String formatHandler(){
        return("/err2.jsp");
    }

}

